package com.back.domain.VO.SYSTEM;

import java.util.*;

public class SysDeptTreeNode {
    private int id;
    private String name;
    private List<SysDeptTreeNode> children = new ArrayList<>();

    public SysDeptTreeNode(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public SysDeptTreeNode() {

    }

    // Getter and Setter methods
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<SysDeptTreeNode> getChildren() {
        return children;
    }

    public void setChildren(List<SysDeptTreeNode> children) {
        this.children = children;
    }
    // 添加子节点的方法
    public void addChild(SysDeptTreeNode child) {
        children.add(child);
    }
}

